<template>
    <el-breadcrumb separator-icon="ArrowRight" style="margin-bottom: 50px;">
        <el-breadcrumb-item>项目管理</el-breadcrumb-item>
        <el-breadcrumb-item :to="{ path: '/home/projectList' }">项目列表</el-breadcrumb-item>
        <el-breadcrumb-item>代码质量评估</el-breadcrumb-item>
        <el-breadcrumb-item>源码信息</el-breadcrumb-item>
    </el-breadcrumb>

    <BasisTable :columns="table_config.table_header" :config="table_config.config" :request="table_config.request">
    </BasisTable>

</template>

<script>
import { reactive, provide } from 'vue';
import { useRouter, useRoute } from "vue-router";

import BasisTable from '../../components/table/BasisTable.vue';
export default {
    name: "ProjectCodeInfo",
    components: { BasisTable },
    setup(props) {
        const search_config = reactive({
            // label_width: "100px",
            // form_button_group: [
            //     { label: "新增", type: "primary", callback: () => addInfo() },
            // ],
        })
        provide("search_config", search_config);

        var projectid = localStorage.getItem("projectid")
        const table_config = reactive({
            table_header: [
                { label: "方法名", prop: "functionname" },
                { label: "入度", prop: "indegree" },
                { label: "出度", prop: "outdegree" },
                { label: "返回类型", prop: "returntype" },
                { label: "圈复杂度", prop: "cyclcomplex" },
                { label: "有效代码行", prop: "executablecodeline" },
                { label: "文件", prop: "fileaddress" },
            ],
            config: {
                selection: false,   //配置复选框
                batch_delete: false,//批量删除按钮
                pagination: true,  //分页
                creatProject: false,//创建项目
                expand: false,
                //expand_all: false,
            },
            request: {
                url: "assess",
                data: {
                    projectid: projectid,
                },
            }
        })
        const { push } = useRouter();

        return {
            table_config,
        }
    }

}
</script>

<style scoped></style>